/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const stockRouter = {
  path: '/views/stockManage',
  component: Layout,
  //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
  redirect: 'noRedirect',
  // alwaysShow: true, //一直显示根路由
  name: 'stockManage',
  meta: {
    title: '库存管理',
    icon: 'stock',
    roles: ['admin', 'user']
  }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
  children: [
    {
      path: '/views/stockManage/stockBill',
      component: () => import('@/views/stockManage/stockBill/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '单据',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/stockManage/stockBill/billInventoryOrder',
          component: () => import('@/views/stockManage/stockBill/billInventoryOrder'), // 盘点单
          name: 'billInventoryOrder',
          meta: {
            title: '盘点单',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockBill/billtTransferOrder',
          component: () => import('@/views/stockManage/stockBill/billtTransferOrder'), // 调拨单
          name: 'billtTransferOrder',
          meta: {
            title: '调拨单',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockBill/billFrmLossOrder',
          component: () => import('@/views/stockManage/stockBill/billFrmLossOrder'), // 报损单
          name: 'billFrmLossOrder',
          meta: {
            title: '报损单',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockBill/billOverflowOrder',
          component: () => import('@/views/stockManage/stockBill/billOverflowOrder'), // 报溢单
          name: 'billOverflowOrder',
          meta: {
            title: '报溢单',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockBill/billCostAdjustment',
          component: () => import('@/views/stockManage/stockBill/billCostAdjustment'), // 成本调整单
          name: 'billCostAdjustment',
          meta: {
            title: '成本调整单',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockBill/billStockSettings',
          component: () => import('@/views/stockManage/stockBill/billStockSettings'), // 库存上下限设置
          name: 'billStockSettings',
          meta: {
            title: '库存上下限设置',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/stockManage/stockRecord',
      component: () => import('@/views/stockManage/stockRecord/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '记录',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/stockManage/stockRecord/transferOrder',
          component: () => import('@/views/stockManage/stockRecord/transferOrder'), // 调拨单记录
          name: 'transferOrder',
          meta: {
            title: '调拨单记录',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockRecord/frmLossOrder',
          component: () => import('@/views/stockManage/stockRecord/frmLossOrder'), // 报损单记录
          name: 'frmLossOrder',
          meta: {
            title: '报损单记录',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockRecord/overflowOrder',
          component: () => import('@/views/stockManage/stockRecord/overflowOrder'), // 报溢单记录
          name: 'overflowOrder',
          meta: {
            title: '报溢单记录',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockRecord/costAdjustmentDocumentOrder',
          component: () => import('@/views/stockManage/stockRecord/costAdjustmentDocumentOrder'), // 成本调整单记录
          name: 'costAdjustmentDocumentOrder',
          meta: {
            title: '成本调整单记录',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockRecord/frmLossOrderDetails',
          component: () => import('@/views/stockManage/stockRecord/frmLossOrderDetails'), // 报损单明细页面
          name: 'frmLossOrderDetails',
          meta: {
            title: '报损单明细',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockRecord/overflowOrderDetails',
          component: () => import('@/views/stockManage/stockRecord/overflowOrderDetails'), // 报溢单明细页面
          name: 'overflowOrderDetails',
          meta: {
            title: '报溢单明细',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockRecord/costAdjustmentOrderDetails',
          component: () => import('@/views/stockManage/stockRecord/costAdjustmentOrderDetails'), // 成本调整单明细页面
          name: 'costAdjustmentOrderDetails',
          meta: {
            title: '成本调整单明细',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/stockManage/stockRecord/transferOrderDetails',
          component: () => import('@/views/stockManage/stockRecord/transferOrderDetails'), // 调拨单明细页面
          name: 'transferOrderDetails',
          meta: {
            title: '调拨单明细',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/reportStatistics/inventoryReport',
      component: () => import('@/views/reportStatistics/inventoryReport/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '统计',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/reportStatistics/inventoryReport/inventoryQuery',
          component: () => import('@/views/reportStatistics/inventoryReport/inventoryQuery'),// 库存查询
          name: 'inventoryQuery',
          meta: {
            title: '库存查询',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/inventoryReport/commodityJXC',
          component: () => import('@/views/reportStatistics/inventoryReport/commodityJXC'), // 商品进销存表
          name: 'commodityJXC',
          meta: {
            title: '商品进销存表',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/inventoryReport/inAndOutDetailsQuery',
          component: () => import('@/views/reportStatistics/inventoryReport/inAndOutDetailsQuery'), // 出入库明细查询
          name: 'inAndOutDetailsQuery',
          meta: {
            title: '出入库明细查询',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/reportStatistics/inventoryReport/inventoryChangeDetails',
          component: () => import('@/views/reportStatistics/inventoryReport/inventoryChangeDetails'), // 库存变动明细
          name: 'inventoryChangeDetails',
          meta: {
            title: '库存变动明细',
            roles: ['admin', 'user']
          }
        },
      ]
    },
  ]
}
export default stockRouter
